<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <head>

        <title>Not present in rendered output</title>

    </head>

    <body>

        <cc:interface>
            <cc:attribute name="sortBy" required="true"/>
            <cc:attribute name="controll" required="true" />
        </cc:interface>

        <cc:implementation>
            <c:set var="ctr" value="#{cc.attrs.controll}"/>
            <h:outputText value="#{cc.attrs.sortBy}"/>&nbsp;&nbsp;
            <h:commandLink action="#{ctr.sortMovies}" >
                <img src="#{resource['images:sortDesc.png']}" alt="searching..."/>
                <f:param name="sortBy" value="#{cc.attrs.sortBy}" />
                <f:param name="sortOrder" value="DESC" />
            </h:commandLink>
            <h:commandLink action="#{ctr.sortMovies}">
                <img  src="#{resource['images:sortAsc.png']}" alt="searching..."/>
                <f:param name="sortBy" value="#{cc.attrs.sortBy}" />
                <f:param name="sortOrder" value="ASC" />
            </h:commandLink>

        </cc:implementation>

    </body>

</html>